data Mn/   &
  84, 101, 144, &
  10,  14, 138, &
  87, 148, 166, &
   1,  50,  67, &
   2,  53,  74, &
   3,  83, 113, &
   4,  90, 121, &
   5,  63, 128, &
   6, 124, 138, &
   8,  22, 108, &
  11,  28, 159, &
  12,  18, 142, &
  13,  24, 145, &
  15, 131, 149, &
  16,  44,  93, &
  17,  41,  47, &
  19,  37, 129, &
  20,  33,  94, &
  21, 100, 154, &
  23,  71, 141, &
  25,  89,  95, &
  26, 105, 153, &
  27,  36,  58, &
  29,  59, 166, &
  30,  52, 126, &
  31,  61,  77, &
  32,  84, 111, &
  34,  97, 155, &
  38,  98, 127, &
  39,  76, 143, &
  40,  55,  92, &
  42, 147, 158, &
  43,  82, 148, &
  45,  49, 109, &
  46,  70,  86, &
  48,  78, 139, &
  51, 101, 104, &
  54,  63,  96, &
  56,  81, 125, &
  57, 117, 164, &
  60,  75, 107, &
  39,  62, 132, &
  64, 110, 118, &
  24,  65, 146, &
  66,  80, 134, &
  68,  91, 114, &
  69, 123, 162, &
  72,  88, 152, &
  79,  99, 130, &
  85, 112, 124, &
  99, 103, 157, &
 106, 115, 133, &
 116, 120, 140, &
 119, 161, 165, &
  64, 122, 137, &
  34,  89, 135, &
 136, 138, 163, &
  93, 144, 159, &
  35, 130, 150, &
  62, 151, 164, &
 104, 153, 160, &
   1, 106, 166, &
   2, 132, 152, &
   3,  11, 105, &
   4,  18, 160, &
   5,  53,  91, &
   6, 109, 141, &
   7, 111, 113, &
   8,  54, 136, &
   9,  61,  92, &
  10,  40, 101, &
  12,  30, 146, &
  13,  37,  82, &
  14,  29,  95, &
   1,  47, 131, &
   2,   8, 139, &
   3,  58, 130, &
   4,  96, 115, &
   5, 119, 129, &
   6,  60, 148, &
   7,  95, 163, &
   2,  35,  56, &
   9,  67,  79, &
  10,  75, 122, &
  11,  17, 121, &
  12, 137, 145, &
  13,  36, 152, &
  14,  15, 155, &
  15, 134, 143, &
  16, 106, 125, &
  11, 106, 157, &
  18,  99, 118, &
  19,  50,  94, &
  20, 126, 158, &
  21,  41, 135, &
  22,  24,  71, &
  23,  42, 136, &
  22, 109, 161, &
  25,  39,  46, &
  26,  45,  55, &
  27,  77,  82, &
  28,  73, 166, &
  29,  69,  76, &
  30, 108, 150, &
  31,  91, 146, &
  14,  32, 147, &
  33,  35, 107, &
  34, 103, 111, &
   8,  94, 122, &
  13,  70, 151, &
  32,  37, 142, &
   3,  38,  87, &
  25,  51,  92, &
  40,  57,  72, &
  21, 108, 153, &
  23,  26, 142, &
  43,  44,  48, &
  30,  43,  62, &
   7,  45, 154, &
  16,  46, 149, &
   1,  53,  75, &
  33,  44, 160, &
  49,  86, 157, &
  19,  80, 159, &
  51, 116, 138, &
  52,  92,  98, &
   6,  12,  47, &
  54,  83, 101, &
  24,  55, 102, &
  56,  63, 120, &
  17,  57,  82, &
  38, 154, 162, &
  59,  74, 151, &
  53, 144, 164, &
  61,  85, 117, &
  62,  66,  90, &
  48, 113, 145, &
  64,  65, 128, &
  27,  29,  65, &
  58,  63, 134, &
   9,  74,  83, &
  68, 109, 113, &
  41,  61,  69, &
  36,  60, 155, &
  42,  64, 144, &
  40,  90, 130, &
  28, 110, 135, &
  20,  59, 112, &
  70, 110, 124, &
  54,  76, 105, &
   4,  77, 111, &
  78, 104, 143, &
  66,  67,  91, &
  80,  81,  88, &
  50, 101, 132, &
  71,  97, 120, &
  72, 131, 158, &
  84, 133, 141, &
   5,  85,  99, &
  49,  89, 133, &
  87, 132, 140, &
  34,  88, 104, &
  89, 105, 147, &
   6,  76, 102, &
  18,  31, 163, &
  52,  96, 140, &
  93, 102, 165, &
  79, 104, 165, &
  81, 100, 126, &
  95, 121, 152, &
  97, 123, 153, &
  37,  98, 114, &
   8,  91, 155, &
 100, 114, 160, &
   2,  26,  28, &
  93, 116, 150, &
  68, 103, 166, &
  78, 117, 125, &
  86, 107, 127, &
   4,  59, 136, &
   9,  37,  97, &
   7,  30,  75, &
  80, 148, 153, &
  73, 138, 164, &
  10,  39, 103, &
  39, 146, 156, &
  48, 129, 136, &
   5,  17,  51, &
 112, 149, 161, &
  11,  24, 126, &
   1,  70,  78, &
  14, 113, 118, &
  10, 119, 141, &
  13,  33, 105, &
  19,  57,  89, &
  12,  25,  56, &
  16,  18,  54, &
  84, 124, 162, &
  20,  41, 134, &
  15,  45,  82, &
 115, 118, 123, &
 128, 139, 149, &
 127, 156, 159, &
  21, 141, 152, &
  23, 130, 156, &
   3, 160, 164, &
  22,  90, 110, &
  35,  61, 109, &
  31,  87, 158, &
  42,  60, 106, &
 137, 140, 157, &
  27, 114, 124, &
  32,  62, 125, &
  34,  38, 128, &
  40, 123, 139, &
  29,  66,  86, &
  36,  52, 161, &
  43,  63, 133, &
  46,  73, 108, &
  44, 135, 146, &
  47, 115, 127, &
  49,  74, 116, &
  58, 102, 122, &
  55,  85, 132, &
  50,  65, 150, &
  67, 145, 162, &
  53,  71,  77, &
  69,  88, 142, &
  68,  72,  93, &
   9,  64,  95, &
  92,  94, 111, &
  81,  83, 119, &
  98, 143, 163, &
  73,  79,  96, &
  35, 129, 131, &
  99, 100, 151, &
   7, 112, 159, &
 117, 137, 156, &
 120, 147, 154, &
 107, 121, 165/

data Nm/   &
   4,  62,  75, 121, 191, &
   5,  63,  76,  82, 175, &
   6,  64,  77, 112, 206, &
   7,  65,  78, 151, 180, &
   8,  66,  79, 159, 188, &
   9,  67,  80, 127, 164, &
  68,  81, 119, 182, 237, &
  10,  69,  76, 109, 173, &
  70,  83, 141, 181, 230, &
   2,  71,  84, 185, 193, &
  11,  64,  85,  91, 190, &
  12,  72,  86, 127, 196, &
  13,  73,  87, 110, 194, &
   2,  74,  88, 106, 192, &
  14,  88,  89, 200,   0, &
  15,  90, 120, 197,   0, &
  16,  85, 131, 188,   0, &
  12,  65,  92, 165, 197, &
  17,  93, 124, 195,   0, &
  18,  94, 148, 199,   0, &
  19,  95, 115, 204,   0, &
  10,  96,  98, 207,   0, &
  20,  97, 116, 205,   0, &
  13,  44,  96, 129, 190, &
  21,  99, 113, 196,   0, &
  22, 100, 116, 175,   0, &
  23, 101, 139, 212,   0, &
  11, 102, 147, 175,   0, &
  24,  74, 103, 139, 216, &
  25,  72, 104, 118, 182, &
  26, 105, 165, 209,   0, &
  27, 106, 111, 213,   0, &
  18, 107, 122, 194,   0, &
  28,  56, 108, 162, 214, &
  59,  82, 107, 208, 235, &
  23,  87, 144, 217,   0, &
  17,  73, 111, 172, 181, &
  29, 112, 132, 214,   0, &
  30,  42,  99, 185, 186, &
  31,  71, 114, 146, 215, &
  16,  95, 143, 199,   0, &
  32,  97, 145, 210,   0, &
  33, 117, 118, 218,   0, &
  15, 117, 122, 220,   0, &
  34, 100, 119, 200,   0, &
  35,  99, 120, 219,   0, &
  16,  75, 127, 221,   0, &
  36, 117, 137, 187,   0, &
  34, 123, 160, 222,   0, &
   4,  93, 155, 225,   0, &
  37, 113, 125, 188,   0, &
  25, 126, 166, 217,   0, &
   5,  66, 121, 134, 227, &
  38,  69, 128, 150, 197, &
  31, 100, 129, 224,   0, &
  39,  82, 130, 196,   0, &
  40, 114, 131, 195,   0, &
  23,  77, 140, 223,   0, &
  24, 133, 148, 180,   0, &
  41,  80, 144, 210,   0, &
  26,  70, 135, 143, 208, &
  42,  60, 118, 136, 213, &
   8,  38, 130, 140, 218, &
  43,  55, 138, 145, 230, &
  44, 138, 139, 225,   0, &
  45, 136, 153, 216,   0, &
   4,  83, 153, 226,   0, &
  46, 142, 177, 229,   0, &
  47, 103, 143, 228,   0, &
  35, 110, 149, 191,   0, &
  20,  96, 156, 227,   0, &
  48, 114, 157, 229,   0, &
 102, 184, 219, 234,   0, &
   5, 133, 141, 222,   0, &
  41,  84, 121, 182,   0, &
  30, 103, 150, 164,   0, &
  26, 101, 151, 227,   0, &
  36, 152, 178, 191,   0, &
  49,  83, 168, 234,   0, &
  45, 124, 154, 183,   0, &
  39, 154, 169, 232,   0, &
  33,  73, 101, 131, 200, &
   6, 128, 141, 232,   0, &
   1,  27, 158, 198,   0, &
  50, 135, 159, 224,   0, &
  35, 123, 179, 216,   0, &
   3, 112, 161, 209,   0, &
  48, 154, 162, 228,   0, &
  21,  56, 160, 163, 195, &
   7, 136, 146, 207,   0, &
  46,  66, 105, 153, 173, &
  31,  70, 113, 126, 231, &
  15,  58, 167, 176, 229, &
  18,  93, 109, 231,   0, &
  21,  74,  81, 170, 230, &
  38,  78, 166, 234,   0, &
  28, 156, 171, 181,   0, &
  29, 126, 172, 233,   0, &
  49,  51,  92, 159, 236, &
  19, 169, 174, 236,   0, &
   1,  37,  71, 128, 155, &
 129, 164, 167, 223,   0, &
  51, 108, 177, 185,   0, &
  37,  61, 152, 162, 168, &
  22,  64, 150, 163, 194, &
  52,  62,  90,  91, 210, &
  41, 107, 179, 240,   0, &
  10, 104, 115, 219,   0, &
  34,  67,  98, 142, 208, &
  43, 147, 149, 207,   0, &
  27,  68, 108, 151, 231, &
  50, 148, 189, 237,   0, &
   6,  68, 137, 142, 192, &
  46, 172, 174, 212,   0, &
  52,  78, 201, 221,   0, &
  53, 125, 176, 222,   0, &
  40, 135, 178, 238,   0, &
  43,  92, 192, 201,   0, &
  54,  79, 193, 232,   0, &
  53, 130, 156, 239,   0, &
   7,  85, 170, 240,   0, &
  55,  84, 109, 223,   0, &
  47, 171, 201, 215,   0, &
   9,  50, 149, 198, 212, &
  39,  90, 178, 213,   0, &
  25,  94, 169, 190,   0, &
  29, 179, 203, 221,   0, &
   8, 138, 202, 214,   0, &
  17,  79, 187, 235,   0, &
  49,  59,  77, 146, 205, &
  14,  75, 157, 235,   0, &
  42,  63, 155, 161, 224, &
  52, 158, 160, 218,   0, &
  45,  89, 140, 199,   0, &
  56,  95, 147, 220,   0, &
  57,  69,  97, 180, 187, &
  55,  86, 211, 238,   0, &
   2,   9,  57, 125, 184, &
  36,  76, 202, 215,   0, &
  53, 161, 166, 211,   0, &
  20,  67, 158, 193, 204, &
  12, 111, 116, 228,   0, &
  30,  89, 152, 233,   0, &
   1,  58, 134, 145,   0, &
  13,  86, 137, 226,   0, &
  44,  72, 105, 186, 220, &
  32, 106, 163, 239,   0, &
   3,  33,  80, 183,   0, &
  14, 120, 189, 202,   0, &
  59, 104, 176, 225,   0, &
  60, 110, 133, 236,   0, &
  48,  63,  87, 170, 204, &
  22,  61, 115, 171, 183, &
  19, 119, 132, 239,   0, &
  28,  88, 144, 173,   0, &
 186, 203, 205, 238,   0, &
  51,  91, 123, 211,   0, &
  32,  94, 157, 209,   0, &
  11,  58, 124, 203, 237, &
  61,  65, 122, 174, 206, &
  54,  98, 189, 217,   0, &
  47, 132, 198, 226,   0, &
  57,  81, 165, 233,   0, &
  40,  60, 134, 184, 206, &
  54, 167, 168, 240,   0, &
   3,  24,  62, 102, 177/

data nrw/    &
5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,5,4,4,  &
4,4,4,5,4,4,4,4,5,5,4,4,4,5,5,4,5,4,5,5,  &
4,4,4,4,4,4,4,4,4,4,4,4,5,5,4,4,4,4,4,4,  &
5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,  &
4,5,4,4,4,4,4,4,5,4,5,5,5,4,5,4,4,4,5,4,  &
5,4,4,5,5,5,4,4,5,4,5,4,5,4,4,4,4,4,4,4,  &
4,4,4,5,4,4,4,4,4,5,4,5,4,4,4,5,4,5,4,4,  &
5,4,4,4,4,5,4,4,4,4,4,5,5,4,4,4,4,4,5,5,  &
4,4,4,5,4,5/

ncw=3

